﻿<%@ Page Language="C#" MasterPageFile="~/tokenTeam/TokenMaster.master" AutoEventWireup="true" CodeFile="message.aspx.cs" Inherits="tokenTeam_message" Title="留言板"   EnableSessionState="True"%>
<%@ Register Assembly="pager" Namespace="wbh" TagPrefix="uc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headHolder" Runat="Server">
    <link href="style/message.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentHolder" Runat="Server">
    <!-- 栏目标题 -->
      <div class="channel messageBanner">
      	<div class="iconBanner"><img src="images/icon_message.gif" alt="留言板"/></div>
      </div>
	  <div class="tips"><%=introduce%></div>
      
      <!-- 留言内容部分 -->
      <div class="detailBox">
        <asp:Repeater ID="rptMsgBox" OnItemDataBound="repMsgBox_ItemDataBound" runat="server">
            <HeaderTemplate><ul></HeaderTemplate>
            <ItemTemplate>
                <li>
                    <div class="messageBox">
                        <div class="title">
                            <div class="icon20 titleUrl"></div><div><span class="nickName"><%# Eval("nickname") %></span><span class="messageTitle"><%# Eval("title")%></span></div>
                        </div>
                        <div class="leave">
                            <div class="icon20 leaveUrl"></div>
                            <span class="blue20h13s">留言时间：<%#Helper.Function.DateTimeSafeConvert(Eval("time_add")).ToString("yyyy-M-d mm:ss") %></span>
                            <div class="text gray18h13s"><%#Helper.Function.NormalizeJSString(Server.HtmlEncode(Eval("content").ToString())) %></div>
                        </div>
                        <asp:Repeater ID="rpt_MsgRelpy" runat="server">
                            <ItemTemplate>
                                <div class="reply">
                                <div class="icon20 replyUrl"></div>
                                <span class="blue20h13s">回复时间：<%#Helper.Function.DateTimeSafeConvert(Eval("reply_time")).ToString("yyyy-M-d mm:ss") %></span>
                                <div class="text red18h13s"><%#Helper.Function.NormalizeJSString(Server.HtmlEncode(Eval("content").ToString()))%></div>
                            </div>
                            </ItemTemplate>
                        </asp:Repeater> 
                    </div>
                </li>
            </ItemTemplate>
            <FooterTemplate></ul></FooterTemplate>
        </asp:Repeater>
      </div>  
      <!-- 分页部分(下) -->
      <div class="pageView"> 
        <div id="spPager">
            <uc:SimplePager CssGotoButton="gotobt" CssGotoPanel="goto" PageSize="10" StringFormatGotoLabelHtml="转到第{0}页"
                        StringFormatPagerButton="<span title='转到第{0}页'>{0}</span>" StringFormatCurrentPagerButton="<a class='current'>{0}</a>"
                        CssClass="pagination" InnerGroupTagBlock="<ul>{0}</ul>" InnerItemTagBlock="<li>{0}</li>"
                        ID="spPager" runat="server" OnPageIndexChanging="SimplePager1_PageIndexChanging"
                        UrlPaging="False">
            </uc:SimplePager>
	    </div>
      </div>

	  <!--留言提交部分-->
      <div class="sendBox">
	    <div class="formRow " id="sendTitle">
          写下您的留言：
        </div>
        <div class="formRow">
          <div class="caption">留言主题</div>
          <div class="edt">
            <asp:TextBox ID="tbTitle" runat="server" CssClass="edtBox" ></asp:TextBox>
            <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" ControlToValidate="tbTitle"
                                Display="dynamic" Text="请填写主题！" runat="server" />
          </div>
        </div>
        <div class="formRow">
          <div class="caption">您的昵称</div>
          <div class="edt">
            <asp:TextBox ID="tbNickName" runat="server" CssClass="edtBox" ></asp:TextBox>
          </div>
        </div>
        
        <div class="formRow">
          <div class="caption">您的邮箱</div>
          <div class="edt">
            <asp:TextBox ID="tbMail" runat="server" CssClass="edtBox" ></asp:TextBox>
            <asp:RegularExpressionValidator
                        ID="valExpDate1" runat="server" ControlToValidate="tbMail"
                        ErrorMessage="请填写正确格式的eMail地址！" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
          </div>
        </div>
        <div class="formRow">
          <div class="caption">留言内容</div>
          <div class="edt">
            <asp:TextBox ID="tbContent" runat="server" Height="150" TextMode="MultiLine"
                                Width="600"  CssClass="edtBox"  ></asp:TextBox>
            <asp:RequiredFieldValidator ID="Requiredfieldvalidator2" ControlToValidate="tbContent"
                                Display="dynamic" Text="请填写内容！" runat="server" />
          </div>
        </div>
        <div class="formRow">
          <div class="caption">验&nbsp;&nbsp;证&nbsp;&nbsp;码</div>
          <div class="edt">
            <asp:TextBox ID="tbValidateNum" Columns="5" CssClass="edtBox edtValidate" EnableViewState="False"
                MaxLength="4" runat="server" style="width: 60px" accesskey="c" ></asp:TextBox>
            <asp:RequiredFieldValidator ID="reqValidateNum" runat="server" ControlToValidate="tbValidateNum"
                Display="Dynamic" SetFocusOnError="true">*验证码</asp:RequiredFieldValidator>
           <img src="../randimg.aspx?tokenmessage" height="20px" style="cursor: hand;" onclick="this.src='../randimg.aspx?tokenmessage&'+Math.random();return false;"
                alt="看不清楚，请换一张" />
           <asp:Label ID="lbValidateErr" runat="server" ForeColor="red" Visible="false"></asp:Label>
           </div>
          </div>
          <div class="clear"></div>
        <div class="formRow">
          <div class="submit">
          	<asp:ImageButton ID="ibSubmit" ImageUrl ="images/send.gif" runat="server" OnClick="ibSubmit_Click"/>
          	
        </div>
			
      </div>
</asp:Content>

